#pragma once

#include <string>

struct git_remote;

namespace git
{

class Cert;

class Remote
{
public:
    Remote() {}

    Remote(const Remote &) = delete;

    Remote(Remote &&b);

    ~Remote();

    Remote &operator=(const Remote &) = delete;

    Remote &operator=(Remote &&b);

    operator bool() const {
        return remote_ != nullptr;
    }

    std::string name() const;

    std::string uri() const;

    void fetch(const Cert &cert);

private:
    Remote(git_remote *remote);

private:
    git_remote *remote_ = nullptr;

    friend class RemoteTrackBranch;
};

} // namespace git
